//
//  UINavigationController+YKOCExection.m
//  YKOCExection
//
//  Created by edward on 2020/6/11.
//  Copyright © 2020 edward. All rights reserved.
//


#import "UINavigationController+YKOCExection.h"

@implementation UINavigationController (YKOCExection)

- (void)yk_setBarForegroundColor:(UIColor *)foregroundColor backgroundColor:(UIColor *)backgroundColor
{
    // 导航条背景颜色
    self.navigationBar.barTintColor = backgroundColor;
    self.navigationBar.backgroundColor = backgroundColor;
    // 导航条title颜色
    NSMutableDictionary *barTitleDic = [NSMutableDictionary dictionary];
    barTitleDic[NSForegroundColorAttributeName] = foregroundColor;
    [[UINavigationBar appearance] setTitleTextAttributes:barTitleDic];
}

@end
